|
|
|
|
|
|
|
Next
MsgBox strMsg, vbInformation, "rsDirect"
'
strMsg = ""
For Each pr In rsJet.Properties
strMsg = strMsg & pr.Name
strMsg = strMsg & " = "
strMsg = strMsg & pr.Value
strMsg = strMsg & " {"
strMsg = strMsg & ShowType(pr.Type)
strMsg = strMsg & "}"
strMsg = strMsg & vbCrLf
MsgBox strMsg
Next
MsgBox strMsg, vbInformation, "rsJet"
'
' cleanup
rsDirect.Close
rsJet.Close
db.Close
co.Close
wsDirect.Close
wsJet.Close
'
Set pr = Nothing
Set rsDirect = Nothing
Set rsJet = Nothing
Set db = Nothing
Set co = Nothing
Set wsDirect = Nothing
Set wsJet = Nothing
'
Exit Sub
'
LocalErr:
strMsg = strMsg & "<err>"
Resume Next
'
End Sub |
|
|
|
|
|
|
|
|
When you save and run this routine, you see a long list of Recordset properties for each of the objects. Note that the lists are different. Even when the property names are the same, some of the values are different (see Figure 9.23). |
|
|
|
|
|
|
|
|
The last data-access object covered today is the Relation data object. This object contains information about established relationships between two tables. Relationships help enforce database referential integrity. Establishing a relationship involves selecting the two tables you want to relate, identifying the field you can use to link the tables together, and defining the type of relationship you want to establish. |
|
|
|
|
|